// 设置token
export const setToken = (token) => {
    localStorage.setItem('token', JSON.stringify(token))
}

// 获取token
export const getToken = () => {
    const token = localStorage.getItem('token')
    if (token) {
        return JSON.parse(token)
    }
    return null
}

// 删除token
export const removeToken = () => {
    localStorage.removeItem('token')
}